home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1996 #6
/
Amiga Plus CD - 1996 - No. 06.iso
/
pd
/
daten
/
megabook
/
rexx
/
megalotto.mbrx
< prev
next >
Wrap
Text File
|
1996-07-04
|
2KB
|
76 lines
/*
MegaLotto ©1996 Eden Software
Written By: Edward Farrow
*/
/*
MegaLotto Is A Pretty Useless Utility Unless You Live In The UK! It
Generates 6 Totally Different Numbers Between 1 And 49 (Ideal For The
National Lottery!) It Then Displays Them As A Nice GUI In MegaBook!
Ok So Its Pretty Crap But It Lets You See What You Can Do Within MB!!
This Is MBWare, It Is To Be Contained Within The MegaBook Archive And
Can Only Be Distributed If You Distribute It With MegaBook! Please Do
Not Change This File In Anyway!
*/
/* MegaBook Path Incase Its Not Loaded */
MBPath = 'MegaBook3:MegaBook'
/* Line Feed Char. Makes A New Line In Requestors (Ta Tom!) */
LF='0a'x
/* ' And " Chars. Makes Requestors Allow ' And " Symbols */
SQ='"';DQ="'"
PARSE ARG LINE
/* Look For MegaBook, If Its Not Running Run It! =o) */
IF ~show('P', 'MEGABOOK.01') THEN DO
ADDRESS COMMAND 'run >nil: 'MBPath
DO 5 WHILE ~show('P', 'MEGABOOK.01')
'SYS:REXXC/waitforport MEGABOOK.01'
END
END
ADDRESS 'MEGABOOK.01'
OPTIONS RESULTS
/* Front GUI */
REQUEST 'MegaLotto v1.00 ©1996 Eden Software'LF'Written By: Edward Farrow'LF'-=-=-=-=-=-=-=-=-=-=-=-=-=-'LF'National Lottery Number Generator' GADS '_Kewl'
/* Number Picking Bit (Really Easy!!!!) */
CALL Randu(time('s'))
Ao:
A = Random(1,49)
Bo:
Ba = Random(1,49)
IF Ba=A THEN CALL Bo
Co:
C = Random(1,49)
IF C=A THEN CALL Co
IF C=Ba THEN CALL Co
Do:
D = Random(1,49)
IF D=A THEN CALL Do
IF D=Ba THEN CALL Do
IF D=C THEN CALL Do
Eo:
E = Random(1,49)
IF E=A THEN CALL Eo
IF E=Ba THEN CALL Eo
IF E=C THEN CALL Eo
IF E=D THEN CALL Eo
Fo:
F = Random(1,49)
IF F=A THEN CALL Fo
IF F=Ba THEN CALL Fo
IF F=C THEN CALL Fo
IF F=D THEN CALL Fo
IF F=E THEN CALL Fo
/* Generate A GUI With These Numbers! */
REQUEST 'Your Lottery Numbers Are:'LF A Ba C D E F'' GADS '_I'DQ'll Jot Em Down!'
/* Quit Properly! */
EXIT 0